/*==============================================================================
             Copyright (c) 2009 - All rights reserved
================================================================================
File description:

    Timeline function definition

================================================================================
      Date            Name                    Description of Change
03-10-2009  Xiaofeng.Gu                    Written
$HISTORY$
==============================================================================*/

#pragma once

#include "Family.h"

typedef std::vector<CFamily*> Families;

class CTimeline : public CSKObject
{
public:
	CTimeline();
	virtual ~CTimeline();

	virtual bool				OnRead(CXMLParser* pParser);
	virtual bool				OnWrite(CXMLParser* pParser);

	virtual SKObjectType		GetSKObjectType() { return eTimeline; }

	Families*					GetFamilies() { return &m_oFamilies; }

	virtual CString				GetName() { return m_strTimelineName; }

	virtual void				Render() {}

	void						GetFramesByIndex(long lIndex, Frames* pFrames);

	CFamily*					GetActiveFamily();

	void						Reset();

private:
	Families					m_oFamilies;
	CString						m_strTimelineName;
};